package com.business.systemmanage.controller;

import com.business.systemmanage.domain.User;
import com.business.systemmanage.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController  {

    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping("helloWorld")
    public String todayIgStatistics(@RequestParam(required = false) String action) {
        User user = userService.findById((long) 1);
        return user.getName()+" Hello World";
    }
}
